package generic;

import java.util.Collection;

/**
 * @program JavaBase
 * @description:
 * @author: zhanglu
 * @create: 2019-06-07 10:09:00
 */
public class Customer<T> {

    private T t;

    public T getT() {
        return t;
    }

    public void setT(T t) {
        this.t = t;
    }

    //从数组到集合的复制 (泛型方法)
    public <T> void copyToCollection(T[] t, Collection<T> coll){
        for(T o : t){
            coll.add(o);
        }
    }

}
